home *** CD-ROM | disk | FTP | other *** search
/ Workplace Effectiveness:…ecision-Making Strategies / Workplace Effectiveness: Decision-Making Strategies.iso / pc / Files / Stepfar.dxr / 00135_add fields.ls < prev    next >
Encoding:
Text File  |  1998-12-16  |  961 b   |  21 lines

  1. property field1, field2, field3, field4, sumfield
  2.  
  3. on beginSprite me
  4.   set X to integer(the text of field ("field" & field1))
  5.   set y to integer(the text of field ("field" & field2))
  6.   set z to integer(the text of field ("field" & field3))
  7.   set zz to integer(the text of field ("field" & field4))
  8.   set z to string(X + y + z + zz)
  9.   set the text of field ("field" & sumfield) to z
  10. end
  11.  
  12. on getPropertyDescriptionList me
  13.   set description to [:]
  14.   addProp(description, #field1, [#default: EMPTY, #format: #string, #comment: "add which field:"])
  15.   addProp(description, #field2, [#default: EMPTY, #format: #string, #comment: "add which field:"])
  16.   addProp(description, #field3, [#default: EMPTY, #format: #string, #comment: "add which field:"])
  17.   addProp(description, #field4, [#default: EMPTY, #format: #string, #comment: "add which field:"])
  18.   addProp(description, #sumfield, [#default: EMPTY, #format: #string, #comment: "sum field:"])
  19.   return description
  20. end
  21.